<template>
	<div>
		<el-button type="primary" size="default" @click="getUser">
			错误未处理
		</el-button>
		<el-button type="primary" size="default" @click="getUser1">
			错误已处理
		</el-button>
		<el-button type="primary" size="default" @click="getUser2">
			reject不产生堆栈，不上报
		</el-button>
	</div>
</template>
<script setup>
	function getUser() {
		return new Promise((resolve, reject) => {
			reject(new Error('Network timeout'));
		});
	}

	function getUser1() {
		let r = new Promise((resolve, reject) => {
			reject(new Error('Network timeout'));
		});
		r.catch(error => {
			console.log('已经处理', error);
		});
	}

	function getUser2() {
		new Promise((resolve, reject) => {
			reject('Network timeout');
		});
	}
</script>
